package com.eat.mapper;

import com.eat.entity.Employee;
import com.eat.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface UserMapper {
    @Select("select * from user where openid=#{openid};")
    User getByOpenId(String openid);

    void insert(User user);

    @Select("select * from user where id = #{userId}")
    User getById(Long userId);

    Integer countByMap(Map map);
    @Select("select * from employee where id = #{id} and phone = #{phone}")
    Employee getEmployeeBy(Integer id, String phone );

}
